home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-06-08 | 1.9 KB | 38 lines | [TEXT/GEOL] |
- Item 7123272 5-June-90 08:58PDT
-
- From: A.XSE010 Austria - SLT Labinstruments,IDV
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: Command not disabled on close
-
- Using MacApp 2.0ß9 (and lots of remnant direct toolbox calls) and Inside Out
- (v. 1.2) through p1 Modula-2 (v. 4.1b2) under MPW 3.0 (haven't got round to
- installing 3.1 yet).
-
- I have a view class which handles two menu commands (which at this stage do
- exactly the same thing). Whether these commands are enabled or not depends on
- there being something selected in the view — if something is selected, they are
- enabled, if nothing is selected they are disabled. The two commands in
- question are only referred to in this class's DoSetupMenus and DoMenuCommands
- methods (via their command numbers). Until I realised that I had to flag these
- command as disabled in the .r file, the enabling and disabling of the commands
- only worked correctly when an instance of the class was active. It now works
- until I close the last window (using the close box — no other method is
- provided) containing an instance of the class with something selected in it...
- the two commands stay enabled, which they shouldn't. I can imagine why this
- might happen: by the time MacApp gets round to calling DoSetupMenus, the
- instance of the view has vanished and so MacApp has no knowledge of the two
- commands or of the methods which enable and process them. If this is the case,
- then it would seem to me to be a design flaw in MacApp. What is the solution?
-
- By the way, can it make any difference at all whether I call INHERITED
- DoSetupMenus at the end or the beginning of the OVERRIDE (perhaps if I try to
- Enable the same command from two event handlers in the command chain)?
-
- I am not on the MacApp.Tech$ group address, so could you please send me a
- response directly to my AppleLink address.
-
- Alex Livingston
-
-